﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Media;

namespace FasterWPF
{
    public static class ScrollSettings
    {
        #region BeginSettings...EndSettings

        #region Vertical Scroll Settings

        //public static SettingsChain<T> SetVerticalScrollUpStepDelayAndInterval<T>(this SettingsChain<T> chain, int scrollUpStep, int scrollUpDelay, int scrollUpInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalScrollUpStepDelayAndInterval<T>(scrollUpStep, scrollUpDelay, scrollUpInterval);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalScrollUpStep<T>(this SettingsChain<T> chain, int scrollUpStep) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalScrollUpStep<T>(scrollUpStep);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalScrollUpDelay<T>(this SettingsChain<T> chain, int scrollUpDelay) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalScrollUpDelay<T>(scrollUpDelay);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalScrollUpInterval<T>(this SettingsChain<T> chain, int scrollUpInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalScrollUpInterval<T>(scrollUpInterval);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalPageDownStepDelayAndInterval<T>(this SettingsChain<T> chain, int pageDownStep, int pageDownDelay, int pageDownInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalPageDownStepDelayAndInterval<T>(pageDownStep, pageDownDelay, pageDownInterval);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalPageDownStep<T>(this SettingsChain<T> chain, int pageDownStep) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalPageDownStep<T>(pageDownStep);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalPageDownDelay<T>(this SettingsChain<T> chain, int pageDownDelay) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalPageDownDelay<T>(pageDownDelay);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalPageDownInterval<T>(this SettingsChain<T> chain, int pageDownInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalPageDownInterval<T>(pageDownInterval);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalScrollDownStepDelayAndInterval<T>(this SettingsChain<T> chain, int scrollDownStep, int scrollDownDelay, int scrollDownInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalScrollDownStepDelayAndInterval<T>(scrollDownStep, scrollDownDelay, scrollDownInterval);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalScrollDownStep<T>(this SettingsChain<T> chain, int scrollDownStep) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalScrollDownStep<T>(scrollDownStep);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalScrollDownDelay<T>(this SettingsChain<T> chain, int scrollDownDelay) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalScrollDownDelay<T>(scrollDownDelay);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalScrollDownInterval<T>(this SettingsChain<T> chain, int scrollDownInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalScrollDownInterval<T>(scrollDownInterval);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalPageUpStepDelayAndInterval<T>(this SettingsChain<T> chain, int pageUpStep, int pageUpDelay, int pageUpInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalPageUpStepDelayAndInterval<T>(pageUpStep, pageUpDelay, pageUpInterval);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalPageUpStep<T>(this SettingsChain<T> chain, int pageUpStep) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalPageUpStep<T>(pageUpStep);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalPageUpDelay<T>(this SettingsChain<T> chain, int pageUpDelay) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalPageUpDelay<T>(pageUpDelay);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalPageUpInterval<T>(this SettingsChain<T> chain, int pageUpInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalPageUpInterval<T>(pageUpInterval);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetVerticalThumbStep<T>(this SettingsChain<T> chain, int deltaStep) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetVerticalThumbStep<T>(deltaStep);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalThumbStep<T>(this SettingsChain<T> chain, int deltaStep) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalThumbStep<T>(deltaStep);
        //    }));
        //    return chain;
        //}

        #endregion

        #region Horizontal Scroll Settings

        //public static SettingsChain<T> SetHorizontalPageLeftStepDelayAndInterval<T>(this SettingsChain<T> chain, int pageLeftStep, int pageLeftDelay, int pageLeftInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalPageLeftStepDelayAndInterval<T>(pageLeftStep, pageLeftDelay, pageLeftInterval);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalPageLeftStep<T>(this SettingsChain<T> chain, int pageLeftStep) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalPageLeftStep<T>(pageLeftStep);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalPageLeftDelay<T>(this SettingsChain<T> chain, int pageLeftDelay) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalPageLeftDelay<T>(pageLeftDelay);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalPageLeftInterval<T>(this SettingsChain<T> chain, int pageLeftInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalPageLeftInterval<T>(pageLeftInterval);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalScrollLeftStepDelayAndInterval<T>(this SettingsChain<T> chain, int scrollLeftStep, int scrollLeftDelay, int scrollLeftInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalScrollLeftStepDelayAndInterval<T>(scrollLeftStep, scrollLeftDelay, scrollLeftInterval);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalScrollLeftStep<T>(this SettingsChain<T> chain, int scrollLeftStep) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalScrollLeftStep<T>(scrollLeftStep);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalScrollLeftDelay<T>(this SettingsChain<T> chain, int scrollLeftDelay) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalScrollLeftDelay<T>(scrollLeftDelay);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalScrollLeftInterval<T>(this SettingsChain<T> chain, int scrollLeftInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalScrollLeftInterval<T>(scrollLeftInterval);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalPageRightStepDelayAndInterval<T>(this SettingsChain<T> chain, int pageRightStep, int pageRightDelay, int pageRightInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalPageRightStepDelayAndInterval<T>(pageRightStep, pageRightDelay, pageRightInterval);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalPageRightStep<T>(this SettingsChain<T> chain, int pageRightStep) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalPageRightStep<T>(pageRightStep);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalPageRightDelay<T>(this SettingsChain<T> chain, int pageRightDelay) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalPageRightDelay<T>(pageRightDelay);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalPageRightInterval<T>(this SettingsChain<T> chain, int pageRightInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalPageRightInterval<T>(pageRightInterval);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalScrollRightStepDelayAndInterval<T>(this SettingsChain<T> chain, int scrollRightStep, int scrollRightDelay, int scrollRightInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalScrollRightStepDelayAndInterval<T>(scrollRightStep, scrollRightDelay, scrollRightInterval);
        //    }));

        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalScrollRightStep<T>(this SettingsChain<T> chain, int scrollRightStep) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalScrollRightStep<T>(scrollRightStep);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalScrollRightDelay<T>(this SettingsChain<T> chain, int scrollRightDelay) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalScrollRightDelay<T>(scrollRightDelay);
        //    }));
        //    return chain;
        //}

        //public static SettingsChain<T> SetHorizontalScrollRightInterval<T>(this SettingsChain<T> chain, int scrollRightInterval) where T : FrameworkElement
        //{
        //    chain.Item2.Add(((container) =>
        //    {
        //        return container.SetHorizontalScrollRightInterval<T>(scrollRightInterval);
        //    }));
        //    return chain;
        //}
        
        #endregion

        #endregion
        
        #region Vertical Scroll Settings

        //public static T SetVerticalScrollUpStepDelayAndInterval<T>(this T chain, int scrollUpStep, int scrollUpDelay, int scrollUpInterval) where T : FrameworkElement
        //{
        //    chain.SetVerticalScrollUpStep(scrollUpStep);
        //    chain.SetVerticalScrollUpDelay(scrollUpDelay);
        //    chain.SetVerticalScrollUpInterval(scrollUpInterval);

        //    return chain;
        //}

        //public static T SetVerticalScrollUpStep<T>(this T chain, int scrollUpStep) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollUpStep"] = scrollUpStep;
        //    return chain;
        //}

        //public static T SetVerticalScrollUpDelay<T>(this T chain, int scrollUpDelay) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollUpDelay"] = scrollUpDelay;
        //    return chain;
        //}

        //public static T SetVerticalScrollUpInterval<T>(this T chain, int scrollUpInterval) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollUpInterval"] = scrollUpInterval;
        //    return chain;
        //}

        //public static T SetVerticalPageDownStepDelayAndInterval<T>(this T chain, int pageDownStep, int pageDownDelay, int pageDownInterval) where T : FrameworkElement
        //{
        //    chain.SetVerticalPageDownStep(pageDownStep);
        //    chain.SetVerticalPageDownDelay(pageDownDelay);
        //    chain.SetVerticalPageDownInterval(pageDownInterval);

        //    return chain;
        //}

        //public static T SetVerticalPageDownStep<T>(this T chain, int pageDownStep) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageDownStep"] = pageDownStep;
        //    return chain;
        //}

        //public static T SetVerticalPageDownDelay<T>(this T chain, int pageDownDelay) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageDownDelay"] = pageDownDelay;
        //    return chain;
        //}

        //public static T SetVerticalPageDownInterval<T>(this T chain, int pageDownInterval) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageDownInterval"] = pageDownInterval;
        //    return chain;
        //}

        //public static T SetVerticalScrollDownStepDelayAndInterval<T>(this T chain, int scrollDownStep, int scrollDownDelay, int scrollDownInterval) where T : FrameworkElement
        //{
        //    chain.SetVerticalScrollDownStep(scrollDownStep);
        //    chain.SetVerticalScrollDownDelay(scrollDownDelay);
        //    chain.SetVerticalScrollDownInterval(scrollDownInterval);

        //    return chain;
        //}

        //public static T SetVerticalScrollDownStep<T>(this T chain, int scrollDownStep) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollDownStep"] = scrollDownStep;
        //    return chain;
        //}

        //public static T SetVerticalScrollDownDelay<T>(this T chain, int scrollDownDelay) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollDownDelay"] = scrollDownDelay;
        //    return chain;
        //}

        //public static T SetVerticalScrollDownInterval<T>(this T chain, int scrollDownInterval) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollDownInterval"] = scrollDownInterval;
        //    return chain;
        //}

        //public static T SetVerticalPageUpStepDelayAndInterval<T>(this T chain, int pageUpStep, int pageUpDelay, int pageUpInterval) where T : FrameworkElement
        //{
        //    chain.SetVerticalPageUpStep(pageUpStep);
        //    chain.SetVerticalPageUpDelay(pageUpDelay);
        //    chain.SetVerticalPageUpInterval(pageUpInterval);

        //    return chain;
        //}

        //public static T SetVerticalPageUpStep<T>(this T chain, int pageUpStep) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageUpStep"] = pageUpStep;
        //    return chain;
        //}

        //public static T SetVerticalPageUpDelay<T>(this T chain, int pageUpDelay) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageUpDelay"] = pageUpDelay;
        //    return chain;
        //}

        //public static T SetVerticalPageUpInterval<T>(this T chain, int pageUpInterval) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageUpInterval"] = pageUpInterval;
        //    return chain;
        //}

        //public static T SetVerticalThumbStep<T>(this T chain, int deltaStep) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerDeltaStep"] = deltaStep;
        //    return chain;
        //}

        //public static T SetHorizontalThumbStep<T>(this T chain, int deltaStep) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["HorizScrollViewerDeltaStep"] = deltaStep;
        //    return chain;
        //}

        #endregion

        #region Horizontal Scroll Settings

        //public static T SetHorizontalPageLeftStepDelayAndInterval<T>(this T chain, int pageLeftStep, int pageLeftDelay, int pageLeftInterval) where T : FrameworkElement
        //{
        //    chain.SetHorizontalPageLeftStep(pageLeftStep);
        //    chain.SetHorizontalPageLeftDelay(pageLeftDelay);
        //    chain.SetHorizontalPageLeftInterval(pageLeftInterval);

        //    return chain;
        //}

        //public static T SetHorizontalPageLeftStep<T>(this T chain, int pageLeftStep) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageLeftStep"] = pageLeftStep;
        //    return chain;
        //}

        //public static T SetHorizontalPageLeftDelay<T>(this T chain, int pageLeftDelay) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageLeftDelay"] = pageLeftDelay;
        //    return chain;
        //}

        //public static T SetHorizontalPageLeftInterval<T>(this T chain, int pageLeftInterval) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageLeftInterval"] = pageLeftInterval;
        //    return chain;
        //}

        //public static T SetHorizontalScrollLeftStepDelayAndInterval<T>(this T chain, int scrollLeftStep, int scrollLeftDelay, int scrollLeftInterval) where T : FrameworkElement
        //{
        //    chain.SetHorizontalScrollLeftStep(scrollLeftStep);
        //    chain.SetHorizontalScrollLeftDelay(scrollLeftDelay);
        //    chain.SetHorizontalScrollLeftInterval(scrollLeftInterval);

        //    return chain;
        //}

        //public static T SetHorizontalScrollLeftStep<T>(this T chain, int scrollLeftStep) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollLeftStep"] = scrollLeftStep;
        //    return chain;
        //}

        //public static T SetHorizontalScrollLeftDelay<T>(this T chain, int scrollLeftDelay) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollLeftDelay"] = scrollLeftDelay;
        //    return chain;
        //}

        //public static T SetHorizontalScrollLeftInterval<T>(this T chain, int scrollLeftInterval) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollLeftInterval"] = scrollLeftInterval;
        //    return chain;
        //}

        //public static T SetHorizontalPageRightStepDelayAndInterval<T>(this T chain, int pageRightStep, int pageRightDelay, int pageRightInterval) where T : FrameworkElement
        //{
        //    chain.SetHorizontalPageRightStep(pageRightStep);
        //    chain.SetHorizontalPageRightDelay(pageRightDelay);
        //    chain.SetHorizontalPageRightInterval(pageRightInterval);

        //    return chain;
        //}

        //public static T SetHorizontalPageRightStep<T>(this T chain, int pageRightStep) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageRightStep"] = pageRightStep;
        //    return chain;
        //}

        //public static T SetHorizontalPageRightDelay<T>(this T chain, int pageRightDelay) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageRightDelay"] = pageRightDelay;
        //    return chain;
        //}

        //public static T SetHorizontalPageRightInterval<T>(this T chain, int pageRightInterval) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerPageRightInterval"] = pageRightInterval;
        //    return chain;
        //}

        //public static T SetHorizontalScrollRightStepDelayAndInterval<T>(this T chain, int scrollRightStep, int scrollRightDelay, int scrollRightInterval) where T : FrameworkElement
        //{
        //    chain.SetHorizontalScrollRightStep(scrollRightStep);
        //    chain.SetHorizontalScrollRightDelay(scrollRightDelay);
        //    chain.SetHorizontalScrollRightInterval(scrollRightInterval);

        //    return chain;
        //}

        //public static T SetHorizontalScrollRightStep<T>(this T chain, int scrollRightStep) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollRightStep"] = scrollRightStep;
        //    return chain;
        //}

        //public static T SetHorizontalScrollRightDelay<T>(this T chain, int scrollRightDelay) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollRightDelay"] = scrollRightDelay;
        //    return chain;
        //}

        //public static T SetHorizontalScrollRightInterval<T>(this T chain, int scrollRightInterval) where T : FrameworkElement
        //{
        //    chain.GetSettingsDictionary()["ScrollViewerScrollRightInterval"] = scrollRightInterval;
        //    return chain;
        //}


        #endregion

    }//end of class
}//end of namespace
